<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>FreeGroup Draw2D 0.9.26 Color Dialog</title>
   <link type="text/css" rel="stylesheet" href="../demo.css" />
   <link href="plugin.css" rel="stylesheet" type="text/css" />

    <SCRIPT src='../../wz_jsgraphics.js'></SCRIPT>      <SCRIPT src='../../mootools.js'></SCRIPT>      <SCRIPT src='../../moocanvas.js'></SCRIPT>      <SCRIPT src='../../draw2d.js'></SCRIPT>

 
        <!-- adding some shapes from the new common package for shape figures -->
	<SCRIPT src="../../shape/package.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/package.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/Actor.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/Class.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/InheritancePort.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/InheritanceConnectionDecorator.js"></SCRIPT>
	<SCRIPT src="../../shape/uml/InheritanceConnection.js"></SCRIPT>

</head>
<body>

<div id="paintarea" style="position:absolute;left:0px;top:0px;width:3000px;height:3000px" >
    <!-- The information help text -->
    <div class="stickyNote">
    <center><b>Draw2D 0.9.26 - A simple diagram drawing demo<br>
    by Andreas Herz (a.herz @ freegroup.de)
    <br>
    </b>
    <br>
    <div style="color:red;font-size:9pt">Focus of this example: Usage of the ConnectionAnchor class.</div>
    </center>
    <br>
    <center>See more on <a href="http://www.draw2d.org">FreeGroup Draw2D 0.9.26</a></center>
    </div>

</div>

<script type="text/javascript">
  var workflow  = new draw2d.Workflow("paintarea");

  // Add an simple annotation to the canvas
  //
  var annotation = new draw2d.Annotation("NOTE: It is not binding that a connection ends in the corresponding port. See ConnectionAnchor for more information.");
  annotation.setDimension(300,70);
  workflow.addFigure(annotation,400,50);

  var actor = new draw2d.shape.uml.Actor("Teacher");
  workflow.addFigure(actor,150,150);


  var object = new draw2d.shape.uml.Class("Object");
  object.addAttribute("id","String");
  workflow.addFigure(object,300,150);

  var rectangle = new draw2d.shape.uml.Class("Rectangle");
  rectangle.addAttribute("width","Integer","0");
  rectangle.addAttribute("height","Integer","0");
  workflow.addFigure(rectangle,100,300);

  var circle = new draw2d.shape.uml.Class("Circle");
  circle.addAttribute("diameter","Integer","0");
  workflow.addFigure(circle,500,300);

  var con = new draw2d.shape.uml.InheritanceConnection();
  con.setSource(rectangle.portTop);
  con.setTarget(object.portTop);
  workflow.addFigure(con);

  var con = new draw2d.shape.uml.InheritanceConnection();
  con.setSource(circle.portTop);
  con.setTarget(object.portTop);
  workflow.addFigure(con);

</script>
</body>
</html>